using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Versions
{
    /// <summary>
    /// <para>Delete Version</para>
    /// <para>Deletes the specified version from the input enterprise, workgroup, or desktop geodatabase.</para>
    /// <para>从输入企业级、工作组级或桌面地理数据库中删除指定版本。</para>
    /// </summary>    
    [DisplayName("Delete Version")]
    public class DeleteVersion : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DeleteVersion()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_workspace">
        /// <para>Input Workspace</para>
        /// <para><xdoc>
        ///   <para>Specifies the database connection file to the enterprise, workgroup, or desktop geodatabase containing the version to be deleted.</para>
        ///   <para>For branch versioning, you can use a feature service URL (that is, https://mysite.mydomain/server/rest/services/ElectricNetwork/FeatureServer) or a feature layer portal item. You can also delete a branch version via a database connection file (connected to a branch versioned workspace) when connected as the geodatabase admin user (sde).</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定与包含要删除的版本的企业级地理数据库、工作组级地理数据库或桌面地理数据库的数据库连接文件。</para>
        ///   <para>对于分支版本化，可以使用要素服务 URL（即 https://mysite.mydomain/server/rest/services/ElectricNetwork/FeatureServer）或要素图层门户项目。当以地理数据库管理员用户 （sde） 身份连接时，您还可以通过数据库连接文件（连接到分支版本化工作空间）删除分支版本。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_version_name">
        /// <para>Version Name</para>
        /// <para><xdoc>
        ///   <para>Specifies the name of the version to be deleted.</para>
        ///   <para>For branch versioning, the name of the branch version to delete should be fully qualified. E.g. servicename.portaluser.versionname.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要删除的版本的名称。</para>
        ///   <para>对于分支版本控制，要删除的分支版本的名称应是完全限定的。例如，servicename.portaluser.versionname。</para>
        /// </xdoc></para>
        /// </param>
        public DeleteVersion(object _in_workspace, object _version_name)
        {
            this._in_workspace = _in_workspace;
            this._version_name = _version_name;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Delete Version";

        public override string CallName => "management.DeleteVersion";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_workspace, _version_name, _out_workspace];

        /// <summary>
        /// <para>Input Workspace</para>
        /// <para><xdoc>
        ///   <para>Specifies the database connection file to the enterprise, workgroup, or desktop geodatabase containing the version to be deleted.</para>
        ///   <para>For branch versioning, you can use a feature service URL (that is, https://mysite.mydomain/server/rest/services/ElectricNetwork/FeatureServer) or a feature layer portal item. You can also delete a branch version via a database connection file (connected to a branch versioned workspace) when connected as the geodatabase admin user (sde).</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定与包含要删除的版本的企业级地理数据库、工作组级地理数据库或桌面地理数据库的数据库连接文件。</para>
        ///   <para>对于分支版本化，可以使用要素服务 URL（即 https://mysite.mydomain/server/rest/services/ElectricNetwork/FeatureServer）或要素图层门户项目。当以地理数据库管理员用户 （sde） 身份连接时，您还可以通过数据库连接文件（连接到分支版本化工作空间）删除分支版本。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_workspace { get; set; }


        /// <summary>
        /// <para>Version Name</para>
        /// <para><xdoc>
        ///   <para>Specifies the name of the version to be deleted.</para>
        ///   <para>For branch versioning, the name of the branch version to delete should be fully qualified. E.g. servicename.portaluser.versionname.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要删除的版本的名称。</para>
        ///   <para>对于分支版本控制，要删除的分支版本的名称应是完全限定的。例如，servicename.portaluser.versionname。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Version Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _version_name { get; set; }


        /// <summary>
        /// <para>Updated Geodatabase</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_workspace { get; set; }


        public DeleteVersion SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}